import Mock from 'mockjs'

const childList = []
const childCount = 50

for (let i = 0; i < childCount; i++) {
  childList.push(Mock.mock({
    menuName: '@increment',
    'url': /[a-z][A-Z][0-9]{5,10}/,
    icon: '@ctitle(3, 10)',
    'sort|1-100': 100,
    'leaf|1': ['0', '1'],
    'state|1': ['0', '1']
  }))
}

export default [
  {
    url: '/menu/list',
    type: 'get',
    response: (req, res) => {
      return {
        code: 0,
        msg: '请求成功',
        data: {
          childList,
          'pageTotal|100-1000': 1000
        }
      }
    }
  }
]
